<?php session_start();
	if(isset($_SESSION['msg'])){?>
	<p class="thongbao <?php echo $_SESSION['msg_type'];?>">
    <img src="../images/<?php echo $_SESSION['msg_type'];?>.png" width="20" height="20"/>
			<?php echo $_SESSION['msg'];
			unset($_SESSION['msg']);?></p>
<?php
	}
?>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="../css/sua.css">
<script language="javascript">
	function them()
	{
		/*
		 //lấy dữ liệu 
		var ma_sua = document.getElementById('ma_sua').value;
		var ten_sua = document.getElementById('ten_sua').value;
		var hang_sua = document.getElementById('hang_sua').value;
		var loai_sua = document.getElementById('loai_sua').value;
		var trong_luong = document.getElementById('trong_luong').value;
		var don_gia = document.getElementById('don_gia').value;
		var thanh_phan_dinh_duong = document.getElementById('thanh_phan_dinh_duong').value;
		var loi_ich = document.getElementById('loi_ich').value;
		var hinh_anh = document.getElementById('hinh_anh').value;
		
		//Dường dẫn
		window.location.href ="them_sm.php?Ma_sua="+ ma_sua +
			"&Ten_sua="+ ten_sua +
			"&Ma_hang_sua="+ hang_sua +
			"&Ma_loai_sua="+ loai_sua +
			"&Trong_luong="+ trong_luong +
			"&Don_gia="+ don_gia +
			"&Tp_Dinh_Duong="+ thanh_phan_dinh_duong +
			"&Loi_ich="+ loi_ich +
			"&Hinh="+ hinh_anh;
		*/
		//Cho form thực hiện
		document.getElementById('fr_them').submit();
		
	}

</script>
<form id="fr_them" action="them_sm.php">
  <table width="600"  cellspacing="1" cellpadding="1" class="them" align="center">
    <tr class="">
      <td colspan="2" align="center" bgcolor="#CCFFCC"><h2>THÊM MỚI SỮA</h2></td>
    </tr>
    <tr>
      <td>Mã sữa:</td>
      <td><input type="text" name="Ma_sua" id="ma_sua"></td>
    </tr>
    <tr>
      <td>Tên sữa:</td>
      <td><input type="text" name="Ten_sua" id="ten_sua"></td>
    </tr>
    <tr>
      <td>Hãng sữa:</td>
      <td><input type="text" name="Ma_hang_sua" id="hang_sua"></td>
    </tr>
    <tr>
      <td>Loại sữa:</td>
      <td><input type="text" name="Ma_loai_sua" id="loai_sua"></td>
    </tr>
    <tr>
      <td>Trọng lượng:</td>
      <td><input type="text" name="Trong_luong" id="trong_luong">(gr hoặc ml)</td>
    </tr>
    <tr>
      <td>Đơn giá:</td>
      <td><input type="text" name="Don_gia" id="don_gia">(VNĐ)</td>
    </tr>
    <tr>
      <td>Thành phần dinh dưỡng:</td>
      <td><textarea name="TP_Dinh_Duong" id="thanh_phan_dinh_duong" cols="45" rows="2"></textarea></td>
    </tr>
    <tr>
      <td>Lợi ích:</td>
      <td><textarea name="Loi_ich" id="loi_ich" cols="45" rows="2"></textarea></td>
    </tr>
    <tr>
      <td>Hình ảnh:</td>
      <td><input type="text" name="Hinh" id="hinh_anh"></td>
    </tr>
    <tr>
      <td colspan="2" align="center"><input type="submit" name="them" id="button" value="Thêm"></td>
    </tr>
  </table>
  </form>

